package com.zeei.ems.base.controller;

import com.zeei.ems.base.dao.UserDao;
import com.zeei.ems.base.service.impl.TestServiceImpl;
import com.zeei.ems.base.util.SpringPropertiesUtils;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;

@Controller
@RequestMapping("/ems")
@Slf4j
@Api(tags = "控制器基类接口")
public class BaseController {

    @Autowired
    UserDao userDao;
    @Autowired
    TestServiceImpl service;

    @RequestMapping("/user")
    @ResponseBody
    public Object getUser(String aa,Date bb){
        service.updateUser(2);
        log.info("hello,world");
        Date date = new Date();
       /* String admin = userDao.getUserName("admin");
        log.info(">>>{}",admin);
        String property = SpringPropertiesUtils.getProperty("conf.name");
        log.info(">>>aa={}",property);*/
//        MQPublishUtil.sendQueueMsg("MQTest","hello,world");
        return date;
    }


    public void test(){

    }
}
